package pe.com.bbva.modpre.utileria;

import java.io.BufferedWriter;
import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;

import com.vaadin.Application;
import com.vaadin.terminal.gwt.server.ApplicationServlet;
import com.vaadin.ui.Window;

@SuppressWarnings("serial")
public class ModpreApplicationServlet extends ApplicationServlet{

	@Override
    protected void writeAjaxPageHtmlVaadinScripts(Window window,
            String themeName, Application application, BufferedWriter page,
            String appUrl, String themeUri, String appId,
            HttpServletRequest request) throws ServletException, IOException {

        page.write("<script type=\"text/javascript\">\n");
        page.write("//<![CDATA[\n");
        page.write("document.write(\"<script language='javascript' src='/Modpre/VAADIN/themes/modpre/js/jquery-2.1.1.js'><\\/script>\");\n");
        page.write("document.write(\"<script language='javascript' src='/Modpre/VAADIN/themes/modpre/js/jquery.caret.js'><\\/script>\");\n");
        page.write("document.write(\"<script language='javascript' src='/Modpre/VAADIN/themes/modpre/js/jquery.number.js'><\\/script>\");\n");
        page.write("document.write(\"<script language='javascript' src='/Modpre/VAADIN/themes/modpre/js/validaciones.js'><\\/script>\");\n");
        page.write("//]]>\n</script>\n");

        super.writeAjaxPageHtmlVaadinScripts(window, themeName, application,
            page, appUrl, themeUri, appId, request);
    }
	
}
